package com.zam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.zam.pojo.SysRoleMenu;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zam
 * @since 2023-12-24
 */
@Mapper
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {

    @Delete("delete from sys_role_menu where role_id=#{roleID} ")
    void deleteByRoleId(Integer roleID);

    @Select("select menu_id from sys_role_menu where role_id=#{roleID}")
    List<Integer> findRelationByRoleId(Integer roleID);
}
